Imports NBear.Common

Namespace EntityImpl
    Public Class IdentableEntity
        Inherits Entity(Of Sample_Entity_Configuration_By_Entity_Configurator.IdentableEntity)
        Implements Sample_Entity_Configuration_By_Entity_Configurator.IdentableEntity
        Public Sub New()
            MyBase.New()
        End Sub

        Public Property Id() As Integer Implements Sample_Entity_Configuration_By_Entity_Configurator.IdentableEntity.Id
            Get
                Return CType(keyValues(0), Integer)
            End Get
            Set(ByVal value As Integer)
                MyBase.CheckOriginalKeyValues()
                keyValues(0) = value
            End Set
        End Property

        Public Property Name() As String Implements Sample_Entity_Configuration_By_Entity_Configurator.IdentableEntity.Name
            Get
                Return CType(keyValues(1), String)
            End Get
            Set(ByVal value As String)
                MyBase.CheckOriginalKeyValues()
                keyValues(1) = value
            End Set
        End Property

        Public Function GetKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.IdentableEntity.GetKeyValues
            Return keyValues
        End Function

        Public Shadows Function GetOriginalKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.IdentableEntity.GetOriginalKeyValues
            Return MyBase.GetOriginalKeyValues()
        End Function

        Public Shadows Sub UpdateOriginalKeyValues() Implements Sample_Entity_Configuration_By_Entity_Configurator.IdentableEntity.UpdateOriginalKeyValues
            MyBase.UpdateOriginalKeyValues()
        End Sub

    End Class

    Public Class Loginable
        Inherits Entity(Of Sample_Entity_Configuration_By_Entity_Configurator.Loginable)
        Implements Sample_Entity_Configuration_By_Entity_Configurator.Loginable
        Public Sub New()
            MyBase.New()
        End Sub

        Public Property LoginId() As String Implements Sample_Entity_Configuration_By_Entity_Configurator.Loginable.LoginId
            Get
                Return CType(keyValues(0), String)
            End Get
            Set(ByVal value As String)
                MyBase.CheckOriginalKeyValues()
                keyValues(0) = value
            End Set
        End Property

        Public Function GetKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.Loginable.GetKeyValues
            Return keyValues
        End Function

        Public Shadows Function GetOriginalKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.Loginable.GetOriginalKeyValues
            Return MyBase.GetOriginalKeyValues()
        End Function

        Public Shadows Sub UpdateOriginalKeyValues() Implements Sample_Entity_Configuration_By_Entity_Configurator.Loginable.UpdateOriginalKeyValues
            MyBase.UpdateOriginalKeyValues()
        End Sub

    End Class

    Public Class PasswordLoginable
        Inherits Entity(Of Sample_Entity_Configuration_By_Entity_Configurator.PasswordLoginable)
        Implements Sample_Entity_Configuration_By_Entity_Configurator.PasswordLoginable
        Public Sub New()
            MyBase.New()
        End Sub

        Public Property Password() As String Implements Sample_Entity_Configuration_By_Entity_Configurator.PasswordLoginable.Password
            Get
                Return CType(keyValues(0), String)
            End Get
            Set(ByVal value As String)
                MyBase.CheckOriginalKeyValues()
                keyValues(0) = value
            End Set
        End Property

        Public Property LoginId() As String Implements Sample_Entity_Configuration_By_Entity_Configurator.PasswordLoginable.LoginId
            Get
                Return CType(keyValues(1), String)
            End Get
            Set(ByVal value As String)
                MyBase.CheckOriginalKeyValues()
                keyValues(1) = value
            End Set
        End Property

        Public Function GetKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.PasswordLoginable.GetKeyValues
            Return keyValues
        End Function

        Public Shadows Function GetOriginalKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.PasswordLoginable.GetOriginalKeyValues
            Return MyBase.GetOriginalKeyValues()
        End Function

        Public Shadows Sub UpdateOriginalKeyValues() Implements Sample_Entity_Configuration_By_Entity_Configurator.PasswordLoginable.UpdateOriginalKeyValues
            MyBase.UpdateOriginalKeyValues()
        End Sub

    End Class

    Public Class PrivilegeAssignable
        Inherits Entity(Of Sample_Entity_Configuration_By_Entity_Configurator.PrivilegeAssignable)
        Implements Sample_Entity_Configuration_By_Entity_Configurator.PrivilegeAssignable
        Public Sub New()
            MyBase.New()
        End Sub

        Public Property PrivilegeOwnerId() As Integer Implements Sample_Entity_Configuration_By_Entity_Configurator.PrivilegeAssignable.PrivilegeOwnerId
            Get
                Return CType(keyValues(0), Integer)
            End Get
            Set(ByVal value As Integer)
                MyBase.CheckOriginalKeyValues()
                keyValues(0) = value
            End Set
        End Property

        Public Function GetKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.PrivilegeAssignable.GetKeyValues
            Return keyValues
        End Function

        Public Shadows Function GetOriginalKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.PrivilegeAssignable.GetOriginalKeyValues
            Return MyBase.GetOriginalKeyValues()
        End Function

        Public Shadows Sub UpdateOriginalKeyValues() Implements Sample_Entity_Configuration_By_Entity_Configurator.PrivilegeAssignable.UpdateOriginalKeyValues
            MyBase.UpdateOriginalKeyValues()
        End Sub

    End Class

    Public Class User
        Inherits Entity(Of Sample_Entity_Configuration_By_Entity_Configurator.User)
        Implements Sample_Entity_Configuration_By_Entity_Configurator.User
        Public Sub New()
            MyBase.New()
        End Sub

        Public Property Id() As Integer Implements Sample_Entity_Configuration_By_Entity_Configurator.User.Id
            Get
                Return CType(keyValues(0), Integer)
            End Get
            Set(ByVal value As Integer)
                MyBase.CheckOriginalKeyValues()
                keyValues(0) = value
            End Set
        End Property

        Public Property Name() As String Implements Sample_Entity_Configuration_By_Entity_Configurator.User.Name
            Get
                Return CType(keyValues(1), String)
            End Get
            Set(ByVal value As String)
                MyBase.CheckOriginalKeyValues()
                keyValues(1) = value
            End Set
        End Property

        Public Property PrivilegeOwnerId() As Integer Implements Sample_Entity_Configuration_By_Entity_Configurator.User.PrivilegeOwnerId
            Get
                Return CType(keyValues(2), Integer)
            End Get
            Set(ByVal value As Integer)
                MyBase.CheckOriginalKeyValues()
                keyValues(2) = value
            End Set
        End Property

        Public Function GetKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.User.GetKeyValues
            Return keyValues
        End Function

        Public Shadows Function GetOriginalKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.User.GetOriginalKeyValues
            Return MyBase.GetOriginalKeyValues()
        End Function

        Public Shadows Sub UpdateOriginalKeyValues() Implements Sample_Entity_Configuration_By_Entity_Configurator.User.UpdateOriginalKeyValues
            MyBase.UpdateOriginalKeyValues()
        End Sub

    End Class

    Public Class LocalUser
        Inherits Entity(Of Sample_Entity_Configuration_By_Entity_Configurator.LocalUser)
        Implements Sample_Entity_Configuration_By_Entity_Configurator.LocalUser
        Public Sub New()
            MyBase.New()
        End Sub

        Public Property Password() As String Implements Sample_Entity_Configuration_By_Entity_Configurator.LocalUser.Password
            Get
                Return CType(keyValues(0), String)
            End Get
            Set(ByVal value As String)
                MyBase.CheckOriginalKeyValues()
                keyValues(0) = value
            End Set
        End Property

        Public Property LoginId() As String Implements Sample_Entity_Configuration_By_Entity_Configurator.LocalUser.LoginId
            Get
                Return CType(keyValues(1), String)
            End Get
            Set(ByVal value As String)
                MyBase.CheckOriginalKeyValues()
                keyValues(1) = value
            End Set
        End Property

        Public Property Id() As Integer Implements Sample_Entity_Configuration_By_Entity_Configurator.LocalUser.Id
            Get
                Return CType(keyValues(2), Integer)
            End Get
            Set(ByVal value As Integer)
                MyBase.CheckOriginalKeyValues()
                keyValues(2) = value
            End Set
        End Property

        Public Property Name() As String Implements Sample_Entity_Configuration_By_Entity_Configurator.LocalUser.Name
            Get
                Return CType(keyValues(3), String)
            End Get
            Set(ByVal value As String)
                MyBase.CheckOriginalKeyValues()
                keyValues(3) = value
            End Set
        End Property

        Public Property PrivilegeOwnerId() As Integer Implements Sample_Entity_Configuration_By_Entity_Configurator.LocalUser.PrivilegeOwnerId
            Get
                Return CType(keyValues(4), Integer)
            End Get
            Set(ByVal value As Integer)
                MyBase.CheckOriginalKeyValues()
                keyValues(4) = value
            End Set
        End Property

        Public Function GetKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.LocalUser.GetKeyValues
            Return keyValues
        End Function

        Public Shadows Function GetOriginalKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.LocalUser.GetOriginalKeyValues
            Return MyBase.GetOriginalKeyValues()
        End Function

        Public Shadows Sub UpdateOriginalKeyValues() Implements Sample_Entity_Configuration_By_Entity_Configurator.LocalUser.UpdateOriginalKeyValues
            MyBase.UpdateOriginalKeyValues()
        End Sub

    End Class

    Public Class AgentUser
        Inherits Entity(Of Sample_Entity_Configuration_By_Entity_Configurator.AgentUser)
        Implements Sample_Entity_Configuration_By_Entity_Configurator.AgentUser
        Public Sub New()
            MyBase.New()
        End Sub

        Public Property LoginId() As String Implements Sample_Entity_Configuration_By_Entity_Configurator.AgentUser.LoginId
            Get
                Return CType(keyValues(0), String)
            End Get
            Set(ByVal value As String)
                MyBase.CheckOriginalKeyValues()
                keyValues(0) = value
            End Set
        End Property

        Public Property Id() As Integer Implements Sample_Entity_Configuration_By_Entity_Configurator.AgentUser.Id
            Get
                Return CType(keyValues(1), Integer)
            End Get
            Set(ByVal value As Integer)
                MyBase.CheckOriginalKeyValues()
                keyValues(1) = value
            End Set
        End Property

        Public Property Name() As String Implements Sample_Entity_Configuration_By_Entity_Configurator.AgentUser.Name
            Get
                Return CType(keyValues(2), String)
            End Get
            Set(ByVal value As String)
                MyBase.CheckOriginalKeyValues()
                keyValues(2) = value
            End Set
        End Property

        Public Property PrivilegeOwnerId() As Integer Implements Sample_Entity_Configuration_By_Entity_Configurator.AgentUser.PrivilegeOwnerId
            Get
                Return CType(keyValues(3), Integer)
            End Get
            Set(ByVal value As Integer)
                MyBase.CheckOriginalKeyValues()
                keyValues(3) = value
            End Set
        End Property

        Public Function GetKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.AgentUser.GetKeyValues
            Return keyValues
        End Function

        Public Shadows Function GetOriginalKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.AgentUser.GetOriginalKeyValues
            Return MyBase.GetOriginalKeyValues()
        End Function

        Public Shadows Sub UpdateOriginalKeyValues() Implements Sample_Entity_Configuration_By_Entity_Configurator.AgentUser.UpdateOriginalKeyValues
            MyBase.UpdateOriginalKeyValues()
        End Sub

    End Class

    Public Class GhostUser
        Inherits Entity(Of Sample_Entity_Configuration_By_Entity_Configurator.GhostUser)
        Implements Sample_Entity_Configuration_By_Entity_Configurator.GhostUser
        Public Sub New()
            MyBase.New()
        End Sub

        Public Property Id() As Integer Implements Sample_Entity_Configuration_By_Entity_Configurator.GhostUser.Id
            Get
                Return CType(keyValues(0), Integer)
            End Get
            Set(ByVal value As Integer)
                MyBase.CheckOriginalKeyValues()
                keyValues(0) = value
            End Set
        End Property

        Public Property Name() As String Implements Sample_Entity_Configuration_By_Entity_Configurator.GhostUser.Name
            Get
                Return CType(keyValues(1), String)
            End Get
            Set(ByVal value As String)
                MyBase.CheckOriginalKeyValues()
                keyValues(1) = value
            End Set
        End Property

        Public Property PrivilegeOwnerId() As Integer Implements Sample_Entity_Configuration_By_Entity_Configurator.GhostUser.PrivilegeOwnerId
            Get
                Return CType(keyValues(2), Integer)
            End Get
            Set(ByVal value As Integer)
                MyBase.CheckOriginalKeyValues()
                keyValues(2) = value
            End Set
        End Property

        Public Function GetKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.GhostUser.GetKeyValues
            Return keyValues
        End Function

        Public Shadows Function GetOriginalKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.GhostUser.GetOriginalKeyValues
            Return MyBase.GetOriginalKeyValues()
        End Function

        Public Shadows Sub UpdateOriginalKeyValues() Implements Sample_Entity_Configuration_By_Entity_Configurator.GhostUser.UpdateOriginalKeyValues
            MyBase.UpdateOriginalKeyValues()
        End Sub

    End Class

    Public Class UserGroup
        Inherits Entity(Of Sample_Entity_Configuration_By_Entity_Configurator.UserGroup)
        Implements Sample_Entity_Configuration_By_Entity_Configurator.UserGroup
        Public Sub New()
            MyBase.New()
        End Sub

        Public Property Comment() As String Implements Sample_Entity_Configuration_By_Entity_Configurator.UserGroup.Comment
            Get
                Return CType(keyValues(0), String)
            End Get
            Set(ByVal value As String)
                MyBase.CheckOriginalKeyValues()
                keyValues(0) = value
            End Set
        End Property

        Public Property Id() As Integer Implements Sample_Entity_Configuration_By_Entity_Configurator.UserGroup.Id
            Get
                Return CType(keyValues(1), Integer)
            End Get
            Set(ByVal value As Integer)
                MyBase.CheckOriginalKeyValues()
                keyValues(1) = value
            End Set
        End Property

        Public Property Name() As String Implements Sample_Entity_Configuration_By_Entity_Configurator.UserGroup.Name
            Get
                Return CType(keyValues(2), String)
            End Get
            Set(ByVal value As String)
                MyBase.CheckOriginalKeyValues()
                keyValues(2) = value
            End Set
        End Property

        Public Property PrivilegeOwnerId() As Integer Implements Sample_Entity_Configuration_By_Entity_Configurator.UserGroup.PrivilegeOwnerId
            Get
                Return CType(keyValues(3), Integer)
            End Get
            Set(ByVal value As Integer)
                MyBase.CheckOriginalKeyValues()
                keyValues(3) = value
            End Set
        End Property

        Public Function GetKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.UserGroup.GetKeyValues
            Return keyValues
        End Function

        Public Shadows Function GetOriginalKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.UserGroup.GetOriginalKeyValues
            Return MyBase.GetOriginalKeyValues()
        End Function

        Public Shadows Sub UpdateOriginalKeyValues() Implements Sample_Entity_Configuration_By_Entity_Configurator.UserGroup.UpdateOriginalKeyValues
            MyBase.UpdateOriginalKeyValues()
        End Sub

    End Class

    Public Class IdFactory
        Inherits Entity(Of Sample_Entity_Configuration_By_Entity_Configurator.IdFactory)
        Implements Sample_Entity_Configuration_By_Entity_Configurator.IdFactory
        Public Sub New()
            MyBase.New()
        End Sub

        Public Property NextId() As Integer Implements Sample_Entity_Configuration_By_Entity_Configurator.IdFactory.NextId
            Get
                Return CType(keyValues(0), Integer)
            End Get
            Set(ByVal value As Integer)
                MyBase.CheckOriginalKeyValues()
                keyValues(0) = value
            End Set
        End Property

        Public Function GetKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.IdFactory.GetKeyValues
            Return keyValues
        End Function

        Public Shadows Function GetOriginalKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.IdFactory.GetOriginalKeyValues
            Return MyBase.GetOriginalKeyValues()
        End Function

        Public Shadows Sub UpdateOriginalKeyValues() Implements Sample_Entity_Configuration_By_Entity_Configurator.IdFactory.UpdateOriginalKeyValues
            MyBase.UpdateOriginalKeyValues()
        End Sub

    End Class

    Public Class EntityWithCustomProperty
        Inherits Entity(Of Sample_Entity_Configuration_By_Entity_Configurator.EntityWithCustomProperty)
        Implements Sample_Entity_Configuration_By_Entity_Configurator.EntityWithCustomProperty
        Public Sub New()
            MyBase.New()
        End Sub

        Public ReadOnly Property ID() As Integer Implements Sample_Entity_Configuration_By_Entity_Configurator.EntityWithCustomProperty.ID
            Get
                Return CType(keyValues(0), Integer)
            End Get
        End Property

        Public Property Name() As String Implements Sample_Entity_Configuration_By_Entity_Configurator.EntityWithCustomProperty.Name
            Get
                Return CType(keyValues(1), String)
            End Get
            Set(ByVal value As String)
                MyBase.CheckOriginalKeyValues()
                keyValues(1) = value
            End Set
        End Property

        Public Property XmlServerConfig() As String Implements Sample_Entity_Configuration_By_Entity_Configurator.EntityWithCustomProperty.XmlServerConfig
            Get
                Return CType(keyValues(2), String)
            End Get
            Set(ByVal value As String)
                MyBase.CheckOriginalKeyValues()
                keyValues(2) = value
            End Set
        End Property

        Public ReadOnly Property SampleProperty() As Sample_Entity_Configuration_By_Entity_Configurator.SampleCustomPropertyType Implements Sample_Entity_Configuration_By_Entity_Configurator.EntityWithCustomProperty.SampleProperty
            Get
                Return New Sample_Entity_Configuration_By_Entity_Configurator.SampleCustomPropertyType(keyValues, New String() {"p1", "p2"})
            End Get
        End Property

        Public Property XmlContactConfig() As String Implements Sample_Entity_Configuration_By_Entity_Configurator.EntityWithCustomProperty.XmlContactConfig
            Get
                Return CType(keyValues(4), String)
            End Get
            Set(ByVal value As String)
                MyBase.CheckOriginalKeyValues()
                keyValues(4) = value
            End Set
        End Property

        Public Function GetKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.EntityWithCustomProperty.GetKeyValues
            Return keyValues
        End Function

        Public Shadows Function GetOriginalKeyValues() As KeyValueCollection Implements Sample_Entity_Configuration_By_Entity_Configurator.EntityWithCustomProperty.GetOriginalKeyValues
            Return MyBase.GetOriginalKeyValues()
        End Function

        Public Shadows Sub UpdateOriginalKeyValues() Implements Sample_Entity_Configuration_By_Entity_Configurator.EntityWithCustomProperty.UpdateOriginalKeyValues
            MyBase.UpdateOriginalKeyValues()
        End Sub

    End Class

End Namespace


